package com.example.demo.system;

import java.io.Serializable;

import com.example.demo.util.SysStatus;

/**
 * 
 * @author hulibin
 *
 * @createTime 创建时间：2018年4月26日 下午3:44:56
 * 
 * 服务异常
 */
public class YcException extends RuntimeException implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private int code;
	
	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public YcException(int code,String message){
		super(message);
		this.code=code;
	}
	
	public YcException(Throwable e){
		super(SysStatus.FAIL.getMsg(), e);
		this.code=SysStatus.FAIL.getStatus();
	}
			
	public YcException(String message,Throwable e){
		super(message, e);
		this.code=SysStatus.FAIL.getStatus();
	}
	public YcException(String message){
		super(message);
		this.code=SysStatus.FAIL.getStatus();
	}
	
	
	

}
